package com.vueperson.vueperson.t1.CreationalPattern.BuildingPattern.VideoApp;


import com.vueperson.vueperson.t1.CreationalPattern.BuildingPattern.BuildActor.Actor;

public  abstract class VideoBuilder {
    protected static VideoApp videoApp=new VideoApp();



    public abstract void buildMenu();
    public abstract void buildPlayList();
    public abstract void buildMainContainer();
    public abstract void buildControlBar();
    public abstract void buildFavoriteList();

    //钩子
    public boolean isBuildMenu(){return false;};
    public boolean isBuildPlayList(){return false;};
    public boolean isBuildMainContainer(){return false;};
    public boolean isBuildControlBar(){return false;};
    public boolean isBuildFavoriteList(){return false;};


    public VideoApp construct(){
        if (!isBuildMenu()) {
            this.buildMenu();
        }
        if (!isBuildPlayList()) {
            this.buildPlayList();
        }
        if(!isBuildMainContainer()){ this.buildMainContainer();}
        if(!isBuildControlBar()){this.buildControlBar();}
        if(!isBuildFavoriteList()){this.buildFavoriteList();}

        return videoApp;
    }


}
